package com.hondee.fuzzyquery.entity.access;

/**
 * 数据库表查询条件
 * @author Allen
 *
 */
public class DBQuery implements IQuery {
	
	private String table;
	private Boolean isPaging;
	private Integer pageIndex;
	private Integer pageSize;
	private IQueryCondition condition;
	private String[] queryFields; 
	private QueryOrder[] order;
	

	public DBQuery(String table, IQueryCondition condition) {
		this.table = table;
		this.condition = condition;
		isPaging = false;
	}

	public DBQuery(String table, Boolean isPaging, Integer pageIndex, Integer pageSize,String[] queryFields,
			IQueryCondition condition,QueryOrder[] order) {
		this.table = table;
		this.queryFields = queryFields;
		if(isPaging==null){
			this.isPaging = false;
		}else{
			this.isPaging = isPaging;
		}
		this.pageIndex = pageIndex;
		this.pageSize = pageSize;
		this.condition = condition;
		this.order = order;
	}

	public QueryOrder[] getOrder() {
		return order;
	}

	public void setOrder(QueryOrder[] order) {
		this.order = order;
	}

	public String[] getQueryFields() {
		return queryFields;
	}

	public void setQueryFields(String[] queryFields) {
		this.queryFields = queryFields;
	}

	public String getTable() {
		return table;
	}



	public void setTable(String table) {
		this.table = table;
	}



	public Boolean getIsPaging() {
		return isPaging;
	}



	public void setIsPaging(Boolean isPaging) {
		this.isPaging = isPaging;
	}



	public Integer getPageIndex() {
		return pageIndex;
	}



	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}



	public Integer getPageSize() {
		return pageSize;
	}



	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}



	public IQueryCondition getCondition() {
		return condition;
	}



	public void setCondition(IQueryCondition condition) {
		this.condition = condition;
	}

	@Override
	public CacheKey generateKey() {
		// TODO Auto-generated method stub
		return null;
	}
}
